function onEditCustomer(frmID, msgDiv,page)
{
	var newId = '';
	var content = null;
	var ret = 2;
	$(frmID).request(
		{	
			asynchronous: false,
			parameters: $(frmID).serialize(true),
	  		onComplete: function(transport)
	  		{ 
			  	var response = transport.responseText || "";
				var pos=response.indexOf('<!');
				content=response.substring(0,pos);
		    	//alert(content);
		    	$(msgDiv).innerHTML = '';
		    	if(content != "")
		    	{
		    		obj = content.evalJSON();
		    		ret=0;
		    		if(obj == null)
		    		{
		    			$(msgDiv).update('Something wrong! Reponsed string is: ' + content);
		    		}
			    	if(msgDiv != null)
				    	$(msgDiv).update(obj.message);
		    	}
		    	if(content == "")
		    	{
		    		ret=2;
		    	}
	  		}
		});
	//alert(ret);
	if(ret==2)
	{
		document.location = page;
	}
	
	$(msgDiv).style.display = 'block';
	Fat.fade_element(msgDiv, null, 1500, null, null);
	
	return false;
}